<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <link rel="icon" type="image/png" href="__PUBLIC__/images/favicon.png?v=26838d09a1?v=26838d09a1">
    <link rel="stylesheet" href="__PUBLIC__/css/bootstrap.css">
    <link rel="stylesheet" href="__PUBLIC__/js/plugins/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="__PUBLIC__/css/admin.css?">
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/css/dt.css" />
    <title>Title</title>
</head>
<body>
<div style="margin: 20px">

    <form class="layui-form layui-form-pane">
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">姓名</label>
                <div class="layui-input-block">
                    <input type="text" name="name" lay-verify="required" placeholder="请输入姓名" autocomplete="off" class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">手机</label>
                <div class="layui-input-block">
                    <input type="text" name="phonenum"  placeholder="请输入姓名" autocomplete="off" class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">身份证</label>
                <div class="layui-input-block">
                    <input type="text" name="cardnum"  placeholder="请输入姓名" autocomplete="off" class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>
    </form>
</div>












<script type="text/javascript" src="__PUBLIC__/js/plugins/layui/lay/dest/layui.all.js"></script>
<script type="text/javascript" src="__PUBLIC__/lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/bootstrap.js"> </script>
<script type="text/javascript">
    $(function () {
        index = parent.layer.getFrameIndex(window.name);
        var form = layui.form();
        form.on('submit(formDemo)', function(data){

            $.post("{:Url('index/member/addMemberPost')}",data.field,function (result) {
                layer.msg(result.msg, {anim: 1, time: 1500}, function () {
                    if (result.code) {
                        parent.refreshTable();
                        parent.layer.close(index);

                    }


                });
            });
            return false; //阻止表单跳转。如果需要表单跳转，去掉这段即可。
        });

    })
</script>
</body>
</html>